/*
* $Id: Control.h 2 2009-12-23 13:58:02Z volok-aleksej@yandex.ru $
*
* Copyright 2008-2009 by Volokitin Alexey
* All rights reserved
*
*/
#ifndef _CONTROL_H_
#define _CONTROL_H_

#include "InterfaceDC.h"
#include "Common/Parameter.h"
#include "../../Wnd.h"

class CControl : public IControl, public CWndImpl
{
protected:
	std::tstring m_strId;
	std::tstring m_strState;
	std::vector<Parameter> m_aParameters;
	CFont* m_pFont;
	CToolTipCtrl tooltip;
	void SendEvent();
public:
	CControl(const std::tstring& strId, const std::tstring& strState, const std::vector<Parameter>& aParameters);
	virtual ~CControl();

	virtual std::tstring GetId();
	virtual void SetState(const std::tstring& strState);
	virtual std::tstring GetState();
	virtual bool Validate();
	virtual std::tstring GetRuleDescribe();
	virtual bool IsTabStop();
	virtual void TabStop();
	virtual void CreateControl(int x, int y, int cx, int cy, int nStyle, const std::tstring& strCaption, CWnd* pParent, int nId) = 0;
	virtual void Free();
};

#endif /*_CONTROL_H_*/